package nku.csc360;
//Part 2 of the homework!!!!!

public class part2 {
	public static final int MAXSTREET = 7;
	public static final int MAXAVENUE = 8;
	//Method that is originally called that can be used to call actual real time working 
	// method
	static void FindPaths(int IkeStreet, int IkeAvenue){
		FindPaths("", IkeStreet, IkeAvenue);
	}
	//Real time working method
	static void FindPaths(String direction, int IkeStreet, int IkeAvenue){
		//Base Case
		if(IkeStreet == 1 && IkeAvenue == 1){
			System.out.println(direction);
		}
		//If it has no more streets to go south.
		//Only one other direction it can go.
		else if( IkeStreet == 1){
			FindPaths(direction + "w", IkeStreet, IkeAvenue-1);
		}
		//If it has no more streets to go west.
		//Only one other direction it can go.
		else if( IkeAvenue == 1){
			FindPaths(direction + "s", IkeStreet-1, IkeAvenue);
		}
		//If it is has two directions it can go.
		//Both cases most be looked at and printed.
		else if (IkeAvenue < MAXAVENUE && IkeStreet < MAXSTREET){
			FindPaths(direction + "s", IkeStreet - 1, IkeAvenue);
			FindPaths(direction + "w", IkeStreet, IkeAvenue-1);
		}
	}
}